package com.onesports.intelligent.k12.polarlight.mapper.course;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.onesports.intelligent.k12.polarlight.domain.entity.course.SpellingClassDetails;
import com.onesports.intelligent.k12.polarlight.domain.entity.course.SpellingClassPeriod;
import com.onesports.intelligent.k12.polarlight.domain.vo.course.CourseScheduleDetailVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.List;

/**
 * 拼班明细表
 *
 * @author
 * @since 1.0.0 2022-07-08
 */
@Mapper
public interface SpellingClassPeriodMapper extends BaseMapper<SpellingClassPeriod> {


    /**
     * 跟改班级课表时段的是否添加考勤记录状态
     *
     * @param period 班级课表时段
     * @return int
     */
    int updateIsCreateAttendance(@Param("period") SpellingClassPeriod period);


    List<CourseScheduleDetailVO> listByClassId(@Param("classId") String classId, @Param("status") String status);

    List<SpellingClassPeriod> expireScheduleDetail(@Param("currentDate") String currentDate, @Param("currentTime") String currentTime, @Param("status") String value);

    int cancelPeriod(@Param("attendanceStatus") String attendanceStatus, @Param("courseScheduleDetailId") String courseScheduleDetailId,
                     @Param("classId") String classId, @Param("cancelReason") String cancelReason);
}
